<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<h3>事务</h3>

${user6.toString()}<br/>
${user7.toString()}<br/>
<a href="${pageContext.request.contextPath}/test/tm">事务模拟操作</a>

<h3>分页</h3>

<a href="${pageContext.request.contextPath}/test/selectUserList">全部</a><br/>
<a href="${pageContext.request.contextPath}/test/selectUserList/1/2">第一页 每页2条</a><br/>
<a href="${pageContext.request.contextPath}/test/selectUserList/2/2">第二页 每页2条</a>

<h3>RESTful</h3>

<p>POST 普通表单</p>
<form action="${pageContext.request.contextPath}/test/insert" method="post">
    姓名 <input type="text" name="name"/><br/>
    <input type="submit" value="提交"/>
</form>

<p>POST 文件表单</p>
<form action="${pageContext.request.contextPath}/test/insertX" enctype="multipart/form-data" method="post">
    姓名 <input type="text" name="name"/><br/>
    文件 <input type="file" name="file"/><br/>
    <input type="submit" value="提交"/>
</form>

<p>DELETE 普通表单</p>
<form action="${pageContext.request.contextPath}/test/delete/1" method="post">
    <input type="hidden" name="_method" value="DELETE"/>
    姓名 <input type="text" name="name"/><br/>
    <input type="submit" value="提交"/>
</form>

<p>PUT 普通表单</p>
<form action="${pageContext.request.contextPath}/test/update/1" method="post">
    <input type="hidden" name="_method" value="PUT"/>
    姓名 <input type="text" name="name"/><br/>
    <input type="submit" value="提交"/>
</form>

<p>PUT 文件表单</p>
<form action="${pageContext.request.contextPath}/test/updateX/1" enctype="multipart/form-data" method="post">
    <input type="hidden" name="_method" value="PUT"/>
    姓名 <input type="text" name="name"/><br/>
    文件 <input type="file" name="file"/><br/>
    <input type="submit" value="提交"/>
</form>

<p>GET 普通表单</p>
<form action="${pageContext.request.contextPath}/test/select/1" method="post">
    <input type="hidden" name="_method" value="GET"/>
    姓名 <input type="text" name="name"/><br/>
    <input type="submit" value="提交"/>
</form>

</body>
</html>